import { LeftComponent } from './left/left.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RightComponent } from './right/right.component';
import { TestComponent } from './test.component';

const routes: Routes = [
  {
    path: '',
    component: TestComponent,
    children: [
      {
        path: 'left',
        component: LeftComponent,
      },
      {
        path: 'right',
        component: RightComponent,
      },
      {
        path: '',
        redirectTo: 'left',
        pathMatch: 'full',
      }
    ]
  },

];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule,
  ]
})

export class TestRoutingModule { }
